package com.jyniubi.core.controller.admin;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.jyniubi.base.result.R;
import com.jyniubi.core.pojo.entity.LendReturn;
import com.jyniubi.core.service.LendReturnService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.awt.windows.WEmbeddedFrame;

import javax.annotation.RegEx;
import javax.annotation.Resource;

/**
 * <p>
 * 还款记录表 前端控制器
 * </p>
 *
 * @author jyzhang
 * @since 2024-04-27
 */
@RestController
@RequestMapping("/admin/core/lendReturn")
public class AdminLendReturnController {
    @Resource
    private LendReturnService lendReturnService;
    @ApiOperation("标的还款记录")
    @GetMapping("/getLendReturnList/{lendId}")
    public R getLendReturnList(@PathVariable("lendId")String lendId){
        return R.ok().data("items",lendReturnService.list(Wrappers.lambdaQuery(LendReturn.class)
        .eq(LendReturn::getLendId,lendId)));
    }
}

